Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set explisit backend version #1415

Merged
merged 1 commit into from
Mar 10, 2025
Merged

set explisit backend version #1415

merged 1 commit into from
Mar 10, 2025

Conversation

tjololo
Copy link
Member

@tjololo tjololo commented Mar 10, 2025

Description

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Summary by CodeRabbit

  • Chores
    • Updated the container deployment configuration to use a specific image version instead of an open-ended reference, ensuring a more consistent and reliable experience.
    • Made minor formatting improvements for better overall consistency.

@tjololo tjololo requested a review from a team as a code owner March 10, 2025 12:59
Copy link
Contributor

coderabbitai bot commented Mar 10, 2025

📝 Walkthrough

Walkthrough

The changes update the container image configuration in the azurerm_container_app resource found in the backend Terraform file. The image tag for the container "dis-demo-pgsql" has been changed from latest to a specific version (0.0.1). Additionally, a newline was appended at the end of the file to address formatting.

Changes

File Change Summary
infrastructure/.../backend.tf Updated the image tag for "dis-demo-pgsql" from latest to 0.0.1 and added a newline at the end of the file.

Suggested reviewers

  • monteiro-renato

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e0ebab6 and 39573ae.

📒 Files selected for processing (1)
  • infrastructure/adminservices-test/altinn-apim-test-rg/backend.tf (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (go)
🔇 Additional comments (2)
infrastructure/adminservices-test/altinn-apim-test-rg/backend.tf (2)

51-51: Explicit Container Image Tag Update

The image reference for the container "dis-demo-pgsql" is now explicitly set to version 0.0.1 instead of using the ambiguous latest tag. This change enhances deployment reliability by ensuring that only a known, fixed version of the image is deployed.


102-102: Trailing Newline Addition

A newline was appended at the end of the file. This adheres to best practices for text files and helps avoid potential issues with some tools that expect a trailing newline.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Mar 10, 2025

Terraform environment test

Format and Style 🖌success

Initialization ⚙️success

Validation 🤖success

Validation Output

Success! The configuration is valid.


Plan 📖success

Show Plan

[Lines containing Refreshing state removed]
[Truncated to 120000 bytes! See logoutput for complete plan]
Acquiring state lock. This may take a few moments...
data.azurerm_container_registry.altinncr: Reading...
data.azurerm_container_registry.altinncr: Read complete after 1s [id=/subscriptions/a6e9ee7d-2b65-41e1-adfb-0c8c23515cf9/resourceGroups/acr/providers/Microsoft.ContainerRegistry/registries/altinncr]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_container_app.container_app will be updated in-place
  ~ resource "azurerm_container_app" "container_app" {
        id                            = "/subscriptions/1ce8e9af-c2d6-44e7-9c5e-099a308056fe/resourceGroups/altinn-apim-test-rg/providers/Microsoft.App/containerApps/altinn-apim-test-hcpyxw-aca"
        name                          = "altinn-apim-test-hcpyxw-aca"
        tags                          = {}
        # (10 unchanged attributes hidden)

      ~ template {
            # (4 unchanged attributes hidden)

          ~ container {
              ~ image             = "altinncr.azurecr.io/dis-hackaton/dis-demo-pgsql:latest" -> "altinncr.azurecr.io/dis-hackaton/dis-demo-pgsql:0.0.1"
                name              = "dis-demo-pgsql"
                # (5 unchanged attributes hidden)

                # (3 unchanged blocks hidden)
            }

            # (1 unchanged block hidden)
        }

        # (3 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: tfplan.out

To perform exactly these actions, run the following command to apply:
    terraform apply "tfplan.out"
Releasing state lock. This may take a few moments...

Context Values
Pusher @tjololo
Action push
Working Directory ./infrastructure/adminservices-test/altinn-apim-test-rg
State File github.com/altinn/altinn-platform/environments/test/altinn-apim-test-rg.tfstate
Plan File github.com_altinn_altinn-platform_environments_test_altinn-apim-test-rg.tfstate.tfplan

@tjololo tjololo merged commit df6ff2b into main Mar 10, 2025
8 checks passed
@tjololo tjololo deleted the tjololo-patch-1 branch March 10, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant